<%-- 
    Document   : popup_progressbar
    Created on : 7 avr. 2013, 16:29:59
    Author     : benjaminvolland
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<SCRIPT language="Javascript">
<!--

var maxprogress = 250;   // total à atteindre
var actualprogress = 0;  // valeur courante
var itv = 0;  // id pour setinterval

function prog()
{
  if(actualprogress >= maxprogress) 
  {
    clearInterval(itv);   	
    return;
  }	
  var progressnum = document.getElementById("progressnum");
  var indicator = document.getElementById("indicator");
  actualprogress += 1;	
  indicator.style.width=actualprogress + "px";
  progressnum.innerHTML = actualprogress;
  if(actualprogress == maxprogress) clearInterval(itv);   
}
-->
    
<div id="popup">
        yahooooooooooooooo
        <div id="pwidget">  
            <div id="progressbar">
                <div id="indicator"></div>
            </div>
            <div id="progressnum">0</div>
        </div>
        <input type="button" name="Submit" value="Lancer la progression"
            onclick="itv = setInterval(prog, 100)" />
        <input type="button" name="Submit" value="Stopper"
            onclick="clearInterval(itv)" />
</div>
                

